<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
	<%@include file="../include.jsp"%>
	<script	src="../static/lib/ztree/jquery.ztree.all-3.5.min.js"></script>
	<link  href="../static/lib/ztree/zTreeStyle.css" type="text/css" rel="stylesheet" >
</head>
<body id="z_body">
	<div class="panel">
		<div class="panel-heading">
			<i class="icon icon-list"></i> 
			${act}指挥中心配置项
		</div>
		<div class="panel-body">
			<div class="row">
				<div>
					<form class="form-horizontal" id="form1">
					<c:if test="${act == '修改'}">
						<input name="czType" value="edit" type="hidden"/>
					</c:if>
					<c:if test="${act == '新增'}">
						<input name="czType" value="add" type="hidden"/>
					</c:if>
						<input name="bh" value="${obj.bh}" type="hidden"/>
						
						<div class="form-group">
							<label class="col-md-3 app_required">指挥中心</label>
								<c:if test="${act == '修改'}">
								<div class="col-md-6">
									<input class="form-control" value="${obj.zhzxqmc}"  validType=""  readonly="readonly">
								</div>
								</c:if>
								<c:if test="${act == '新增'}">
									<div class="col-md-6">
										<input class="form-control" name="zhzxbh" validType="notEmpty" type="hidden">
										<input class="form-control app_selector" name="zhzxqmc" 
											data_tree="{type:'zhzx', multi:false, fresh:true, extra:''}">
									</div>
								</c:if>
						</div>
						<div class="form-group">
							<label class="col-md-3 app_required">指标项</label>
								<c:if test="${act == '修改'}">
									<div class="col-md-6">
										<input class="form-control" value="${obj.zbxmc}"  validType=""  readonly="readonly">
									</div>
								</c:if>
								<c:if test="${act == '新增'}">
									<div class="col-md-6">
										<input class="form-control" name="zbxbh" validType="notEmpty" type="hidden">
										<input class="form-control app_selector" name="zbxmc" 
											data_tree="{type:'zhzxzbx', multi:false, fresh:true, extra:''}">
									</div>
								</c:if>
						</div>
						<div class="form-group">
								<label class="col-md-3">指标项值</label>
								<div class="col-md-6">
									<input class="form-control" name="zbxz" placeholder="指标项值" value="${obj.zbxz}" />
								</div>
							</div>
					</form>
				</div>
			</div>
			
			<div style="text-align: center;">
				<a class="btn btn-primary" onclick="save()">保存</a> &nbsp;
				<a class="btn btn-default" onclick="parent.closeModal()">取消</a>
			</div>
			
		</div>
	</div>
	
	
<script type="text/javascript">
	
	/**
	 * 保存
	 */
	function save() {
		if(validateForm("form1")) {//表单验证
			tool.save("../zhzxpz/save", $("#form1").serialize(), function(res) {
				parent.getPage();
				setTimeout(function(){
					parent.closeModal();
				}, 800);
			});
		}
	}
</script>

</body>
</html>